<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //方式1
    function add(a, b) {
        return a + b;
    }

    let a=add(10,20);
    alert(a);
    //方式2
    var add=function(a,b){
        return a+b;
    }
    let b=add(20,20);
    alert(b);
</script>
</html>